#
# This script file creates a backup file of rARC database
#

#!/bin/sh

# NOTE! SET THESE VARIABLES
USERNAME_DATABASE=""
PASSWORD_DATABASE=""
NAME_DATABASE=""
BACKUP_DIR=""

DATE=`date +%d%m%Y\-%H\-%M`


if [ -d $BACKUP_DIR ]; then
  echo > /dev/null
else
   mkdir $BACKUP_DIR
fi

mysqldump -u$USERNAME_DATABASE -p$PASSWORD_DATABASE $NAME_DATABASE > backupDBrARC.sql

tar -czf $BACKUP_DIR/backupDBrARC-$DATE.tar.gz backupDBrARC.sql

rm -f backupDBrARC.sql
